using System;
using System.Web.UI;
using Sedna.Core.Controller;

namespace Sedna.Core.Globalization
{
	/// <summary>
	/// This class is to be used from pages only. Developers are generally discouraged from 
	/// using this static class in their control code. IConfiguration.IMessageManager should be used instead.
	/// </summary>
	public class ImageManager
	{
		public static string Relate(Control control, string relativePath)
		{
			IImageManager imageManager = (IImageManager)SpringContextFactory.GetContext().GetObject("runtime.ImageManager");
			return control.ResolveUrl(imageManager.RelateImageUrl(relativePath));
		}
	}
}
